-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] 🌱 Use manager and builder pkgs of controller-runtime explicitly. #7175
[WIP] 🌱 Use manager and builder pkgs of controller-runtime explicitly. #7175
Conversation
Otherwise, controller-runtime will implicitly set the `kubeconfig` flag to the global command line FlagSet when using the alias types defined in alias.go. See: https://github.com/kubernetes-sigs/controller-runtime/blob/15b6689c55745514d6bade4c55efb3333c0da4d9/alias.go#L80 The usage of the alias types potentially collides with user code that imports the api packages of Cluster API. Signed-off-by: Johannes Frey <johannes.frey@mercedes-benz.com>
/hold |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
It would be great to get some feedback about this experiment at the office hours; if this make our APIs easier to consume from other go projects, I'm pretty sure many people will be interested in it |
Let's see if the controller-runtime PR merges. Then we don't need this change and also don't have to keep it in mind going forward |
can we link CR PR here or on the issues for better visibility? |
Issue: kubernetes-sigs/controller-runtime#1396 @johannesfrey Can you edit your post on the CAPI issue where you linked the issue and also mention the PR? |
Thx. I updated the issue. |
Closing because of #7176 (comment) |
What this PR does / why we need it:
Use manager and builder pkgs of controller-runtime explicitly. Otherwise, controller-runtime will implicitly set the
kubeconfig
flag to the global command line FlagSet when using the alias types defined in alias.go. See:https://github.com/kubernetes-sigs/controller-runtime/blob/15b6689c55745514d6bade4c55efb3333c0da4d9/alias.go#L80
The usage of the alias potentially collides with user code that imports the api packages of Cluster API.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #7176
Johannes Frey <johannes.frey@mercedes-benz.com>, Mercedes-Benz Tech Innovation GmbH (Provider Information)